The present invention pertains to the use of so-called soft fonts or true type fonts by applications running an operating system of a data processing system. More particularly, the invention relates to creation of true type fonts for a printer that is other than the printer selected by an application running in a MICROSOFT (R) WINDOWS (R) operating system or similar environment.
Sometimes in creating a mail piece, including an envelope and also pages to be inserted in the envelope, the address for the mail piece is included in the computer file that is printed as the pages of the mail piece. It is thus advantageous to have the address information automatically extracted from the computer file storing the pages of the mail piece for printing the envelope. The prior art includes some mail systems that do this. In such a system, both the pages of a mail piece, as well as the corresponding envelope, can be printed by the user issuing a single command, xe2x80x9cprint file.xe2x80x9d The layout of the envelope is usually provided in a separate envelope template file.
The prior art teaches various such mail merge systems, and even provides a system in which one printer is used to print the document pages of a mail piece, and another is used to print the envelope. In such a two-printer system for creating mail pieces (based on a word processing application), with the two printers connected to a single input/output (I/O) of a personal computer, both the document pages of the mail piece and the envelope are printed in response to a single xe2x80x9cprint filexe2x80x9d command. Upon receiving such a command (from a user), the word processing application provides a data stream that includes the data to be printed as the document pages (along with formatting commands, which might specify one or more true type fonts), and also the data to be printed to the envelope (using the layout provided in the envelope template file).
In such a two-printer mail merge system (whether or not the printers are of differing kinds), using so-called true type fonts is problematic with the MICROSOFT WINDOWS operating system or a similar operating system or environment (such as MICROSOFT WINDOWS 3.1). The advantage of a true type font is that it can be scaled (by the operating system) to meet the needs of a document, which is easier than designing a document based on available hard fonts, i.e. fonts that can be printed in only various pre-determined sizes.
Using true type fonts is problematic because of how true type fonts are dynamically created. A true type font is used by an application only after it is first realized, i.e. after instructions for printing the font characters are generated by a printer driver called by the operating system (using information about the font stored on the computer hosting the application). Before realizing a font, a so-called device context must be created, i.e. the operating system must be made to expect that a true type font is to be created. The device context is associated with the selected printer, in the sense of the WINDOWS operating system, i.e. the printer that is selected using the WINDOWS menu system to print a file. Under the WINDOWS operating system, it is normally not possible to create true type fonts by a process other than that of the application (word processor) initiating the printing job.
Thus, what is needed is a method and system in a WINDOWS or similar operating system or environment, of creating (realizing) a true type font using a process other than the that of the application initiating printing of the document pages of a mail piece so as to be able to print an associated envelope using the true type font (dynamic font).
Accordingly, the present invention provides a system and corresponding method for creating a mail piece consisting of document pages and an envelope. The pages are printed according to data and layout specified in a pages file and using a pages font as indicated in the pages file; the corresponding envelope is printed with address information extracted from the pages file according to instructions specified in an envelope template file; the instructions include a layout and an envelope font that is a dynamic font. The system includes a printer driver that is responsive to a call, made by the application used to create the pages of the mail piece, to prepare to start printing the pages of the mail piece and in turn for obtaining the envelope text from the envelope template file. The printer driver is further responsive to a call (from the application) to realize the pages font; the printer subsequently realizes the pages font and the envelope font. The printer driver is further responsive to a first page of pages data, which the printer driver subsequently provides to an I/O port interface, while downloading the envelope font and providing the envelope data (including the envelope font) to the I/O port interface. Finally, the printer driver is responsive to the remaining pages data, which is then provided to the I/O port interface.
The present invention is of particular use in those instances where one or two printers are connected to the I/O port interface, so long as the envelope template file specifies that a true type font is to be used in printing the envelope. In an embodiment where two printers are connected, so that the pages of the mail piece print on one printer and the envelope prints on the other, the printer controller of one of the printers is specially adapted to regulate the flow of the stream of printing instructions being provided by the printer driver through the I/O port interface.